-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: fix flaky test on CI #8756
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
No changes to documentation |
⚡️ Editor Performance ReportUpdated Mon, 24 Feb 2025 21:11:49 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
Component Testing Report Updated Feb 24, 2025 9:20 PM (UTC) ❌ Failed Tests (3) -- expand for details
|
ad91f00
to
f94f661
Compare
Coverage Report
File CoverageNo changed files found. |
f94f661
to
054c65b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great find, much appreciated <3
Description
Fixes a flaky test, that fails on almost every single PR.
The core issue were that the
hydrateRoot
instance creates a React render tree that continues to live on after the test is tore down.And in some cases it would try to re-render the
<Studio />
test after teardown, at which point globals likewindow
were no longer there and thus created this confusing error on builds:There's both the case that
act
were missing anawait
, as well as noroot.unmount()
which lets react cleanup the test.When using
@testing-library/react
, this cleanup happens automatically. However in this particular test we were callinghydrateRoot
manually and thus have to do the cleanup ourselves.What to review
Does it make sense?
Testing
If the CI passes every time, instead of some of the time, then we're good 👍
Notes for release
N/A